<html>
	<head>
		<title>Vehicle Chart</title>
		<script src="RGraph.common.core.lib" type="text/javascript" charset="utf-8"></script>
		<script src="RGraph.common.dynamic.js" type="text/javascript" charset="utf-8"></script>
		<script src="RGraph.scatter.js" type="text/javascript" charset="utf-8"></script>
		<script language="JavaScript" type="text/javascript">
			// Prevent webview from bouncing
			document.ontouchmove = function(event) {
				//event.preventDefault();
			}
			// Render the chart based on input data
			Ti.App.addEventListener('renderChart', function(e) {

				var scatter = new RGraph.Scatter('cvs', e.data);
				scatter.Set('chart.xmax', 365);
				scatter.Set('chart.labels', ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']);
				scatter.Set('chart.line', true);
				scatter.Set('chart.tickmarks', 'circle');

				if(e.chartType == 'economy') {
					scatter.Set('chart.scale.formatter', function(obj, num) {
						
						return (num / 10.0).toFixed(1);
					});
				}
				
				scatter.Draw();
			});
		</script>
	</head>
	<body style="margin:0;padding:0;">

		<canvas id="cvs" width="475" height="235">
			[No canvas support]
		</canvas>
	</body>
</html>